<?php
/**
 * regd by PhpStorm.
 * User: lee
 * Date: 2017/11/29
 * Time: 17:31
 */

namespace Biz\validate\trade;


class ShopAddress extends \Doraemon\pockets\validate\Base
{


    public static function rules()
    {
        return [
            ['accept_name', 'required', null, '请填写收货人姓名', ['update', 'insert']],
            ['accept_name', 'length', '1,20', '姓名最多20字', ['update', 'insert']],
            ['accept_name', 'regex', ['pattern' => '/^[\x{4e00}-\x{9fa5}_\-a-zA-Z0-9]+$/u'], '请正确填写收货人姓名', ['update', 'insert']],

            ['info_address', 'required', null, '请填写详细地址', ['update', 'insert']],
            ['info_address', 'length', '1,50', '详细地址最多50字', ['update', 'insert']],

            ['mobile', 'required', null, '请填写手机号', ['update', 'insert']],

            ['remark', 'length', '0,200', '备注最多200字', ['update', 'insert']],

        ];

    }

}